<?php

/**
 * Joomla! 1.5 component retweet
 * @version 0.1
 * @author Chris Borkowski
 * @package com_retweet
 * @license http://opensource.org/licenses/gpl-license.php GNU Public License
 **/

// no direct access
defined('_JEXEC') or die('Restricted access');
?>
<?php  JHTML::_('behavior.tooltip');?>
<?php  // Set toolbar items for the page
	$edit = JRequest::getVar('edit', true);
	$text = !$edit ? JText::_('New') : JText::_('Edit');
	JToolBarHelper::title(JText::_('Tweet') . ': <small>[ ' . $text . ' ]</small>');
	JToolBarHelper::save();
	JToolBarHelper::apply();
	if (!$edit) {
		JToolBarHelper::cancel();
	} else {
		JToolBarHelper::cancel('cancel', 'Close');
	}
?>
<style>
	.icon-48-generic{
		background-image:url("/administrator/components/com_retweet/images/comretweet48.png");
        margin: 4px 4px 0px 0px;
	}
</style>

<script language="javascript" type="text/javascript">
		<!--
	function submitbutton(pressbutton) {
	var form = document.adminForm;
	if (pressbutton == 'cancel') {
	submitform( pressbutton );
	return;
	}
	// do field validation
	if (form.title.value == ""){
	alert( "<?php  echo JText::_('Please give a title', true);?>
		" );
		} else if (form.catid.value == "0"){
		alert( "
<?php  echo JText::_('Please select a category', true);?>
		" );
		} else {
		submitform( pressbutton );
		}
		}
		-->
</script>
<form action="index.php" method="post" name="adminForm" id="adminForm">
	<table cellspacing="0" cellpadding="0" border="0" width="100%">
		<tr>
			<td width="50%" valign="top">
			<fieldset class="adminform">
				<legend>
					<?php  echo JText::_('Details');?>
				</legend>
				<table class="admintable">
					<tr>
						<td width="100" align="right" class="key"><label for="title"> <?php  echo JText::_('Title');?>: </label></td>
						<td>
						<input class="text_area" type="text" name="title" id="title" size="48" maxlength="250" value="<?php  echo $this -> item -> title;?>" />
						</td>
					</tr>
					<tr>
						<td width="100" align="right" class="key"><label for="alias"> <?php  echo JText::_('Alias');?>: </label></td>
						<td>
						<input class="text_area" type="text" name="alias" id="alias" size="32" maxlength="250" value="<?php  echo $this -> item -> alias;?>" />
						</td>
					</tr>
					<tr>
						<td valign="top" align="right" class="key"><?php  echo JText::_('Published');?>:</td>
						<td><?php  echo $this -> lists['published'];?></td>
					</tr>
					<tr>
						<td valign="top" align="right" class="key"><label for="catid"> <?php  echo JText::_('Category');?>: </label></td>
						<td><?php  echo $this -> lists['catid'];?></td>
					</tr>
					<td valign="top" align="right" class="key"><label for="ordering"> <?php  echo JText::_('Ordering');?>: </label></td>
					<td><?php  echo $this -> lists['ordering'];?></td>
		</tr>
	</table>
	</fieldset>
	<fieldset class="adminform">
		<legend>
			<?php  echo JText::_('Custom Fields');?>
		</legend>
		<table class="admintable" width="100%">
			<tr>
				<td width="100" align="right" class="key"><label for="body"> <?php  echo JText::_('Body');?>: </label></td>
				
				<td><?php echo $this->editor->display( 'body',  $this->item->body, '100%', '450', '500', '5' ) ;?></td>
				
			</tr>
			<tr>
				<td width="100" align="right" class="key"><label for="new_body"> <?php  echo JText::_('New Body');?>: </label></td>
				<td><?php echo $this->editor->display( 'new_body',  $this->item->new_body, '100%', '450', '500', '5' ) ;?></td>
				
			</tr>
			<tr>
				<td width="100" align="right" class="key"><label for="use_new_body"> <?php  echo JText::_('Use New Body ?');?>: </label></td>
				<td>
				<?php  echo $this -> lists['use_new_body'];?>	</td>
			</tr>
			<tr>
				<td width="100" align="right" class="key"><label for="twitter_profile"> <?php  echo JText::_('Twitter Profile');?>: </label></td>
				<td>
				<input class="text_area" type="text" name="twitter_profile" id="twitter_profile" size="32" maxlength="250" value="<?php  echo $this -> item -> twitter_profile;?>" />
				</td>
			</tr>
			<tr>
				<td width="100" align="right" class="key"><label for="profile_override"> <?php  echo JText::_('Profile Override');?>: </label></td>
				<td>
				<input class="text_area" type="text" name="profile_override" id="profile_override" size="32" maxlength="250" value="<?php  echo $this -> item -> profile_override;?>" />
				</td>
			</tr>
			<tr>
				<td width="100" align="right" class="key"><label for="use_profile_override"> <?php  echo JText::_('Use Profile Override ?');?>: </label></td>
				<td>
				<?php  echo $this -> lists['use_profile_override'];?>
				</td>
			</tr>
			<tr>
				<td width="100" align="right" class="key"><label for="twitter_avatar"> <?php  echo JText::_('Twitter Avatar');?>: </label></td>
				<td>
				<input class="text_area" type="text" name="twitter_avatar" id="twitter_avatar" size="32" maxlength="250" value="<?php  echo $this -> item -> twitter_avatar;?>" />
				</td>
			</tr>
			<tr>
				<td width="100" align="right" class="key"><label for="avatar_override"> <?php  echo JText::_('Avatar Override');?>: </label></td>
				<td>
				<input class="text_area" type="text" name="avatar_override" id="avatar_override" size="32" maxlength="250" value="<?php  echo $this -> item -> avatar_override;?>" />
				</td>
			</tr>
			<tr>
				<td width="100" align="right" class="key"><label for="link_to_profile"> <?php  echo JText::_('Link To Profile ?');?>: </label></td>
				<td>
				<?php  echo $this -> lists['link_to_profile'];?>
				</td>
			</tr>
			<tr>
				<td width="100" align="right" class="key"><label for="faux_profile_link"> <?php  echo JText::_('Faux Profile Link');?>: </label></td>
				<td>
				<input class="text_area" type="text" name="faux_profile_link" id="faux_profile_link" size="32" maxlength="250" value="<?php  echo $this -> item -> faux_profile_link;?>" />
				</td>
			</tr>
			<tr>
				<td width="100" align="right" class="key"><label for="tinyurl"> <?php  echo JText::_('Tinyurl');?>: </label></td>
				<td>
				<input class="text_area" type="text" name="tinyurl" id="tinyurl" size="32" maxlength="250" value="<?php  echo $this -> item -> tinyurl;?>" />
				</td>
			</tr>
			<tr>
				<td width="100" align="right" class="key"><label for="tinyurl_service"> <?php  echo JText::_('Tinyurl Service to Use');?>: </label></td>
				<td>
				<input class="text_area" type="text" name="tinyurl_service" id="tinyurl_service" size="32" maxlength="250" value="<?php  echo $this -> item -> tinyurl_service;?>" />
				</td>
			</tr>
			<tr>
				<td width="100" align="right" class="key"><label for="patform_source"> <?php  echo JText::_('Patform Source');?>: </label></td>
				<td>
				<input class="text_area" type="text" name="patform_source" id="patform_source" size="32" maxlength="250" value="<?php  echo $this -> item -> patform_source;?>" />
				</td>
			</tr>
			<tr>
				<td width="100" align="right" class="key"><label for="override_source"> <?php  echo JText::_('Override Source');?>: </label></td>
				<td>
				<input class="text_area" type="text" name="override_source" id="override_source" size="32" maxlength="250" value="<?php  echo $this -> item -> override_source;?>" />
				</td>
			</tr>
			<tr>
				<td width="100" align="right" class="key"><label for="media_service"> <?php  echo JText::_('Media Service for Storage');?>: </label></td>
				<td>
				<input class="text_area" type="text" name="media_service" id="media_service" size="32" maxlength="250" value="<?php  echo $this -> item -> media_service;?>" />
				</td>
			</tr>
			<tr>
				<td width="100" align="right" class="key"><label for="photo"> <?php  echo JText::_('Photo');?>: </label></td>
				<td>
				<input class="text_area" type="text" name="photo" id="photo" size="32" maxlength="250" value="<?php  echo $this -> item -> photo;?>" />
				</td>
			</tr>
			<tr>
				<td width="100" align="right" class="key"><label for="video"> <?php  echo JText::_('Video');?>: </label></td>
				<td>
				<input class="text_area" type="text" name="video" id="video" size="32" maxlength="250" value="<?php  echo $this -> item -> video;?>" />
				</td>
			</tr>
			<tr>
				<td width="100" align="right" class="key"><label for="audio"> <?php  echo JText::_('Audio');?>: </label></td>
				<td>
				<input class="text_area" type="text" name="audio" id="audio" size="32" maxlength="250" value="<?php  echo $this -> item -> audio;?>" />
				</td>
			</tr>
			<tr>
				<td width="100" align="right" class="key"><label for="location"> <?php  echo JText::_('Location');?>: </label></td>
				<td>
				<input class="text_area" type="text" name="location" id="location" size="32" maxlength="250" value="<?php  echo $this -> item -> location;?>" />
				</td>
			</tr>
			<tr>
				<td width="100" align="right" class="key"><label for="tags"> <?php  echo JText::_('Tags');?>: </label></td>
				<td>
				<input class="text_area" type="text" name="tags" id="tags" size="32" maxlength="250" value="<?php  echo $this -> item -> tags;?>" />
				</td>
			</tr>
			<tr>
				<td width="100" align="right" class="key"><label for="retweet"> <?php  echo JText::_('Retweet');?>: </label></td>
				<td>
				<?php  echo $this -> lists['retweet'];?></td>
			</tr>
			<tr>
				<td width="100" align="right" class="key"><label for="retweet_to_profile"> <?php  echo JText::_('Retweet_to_profile');?>: </label></td>
				<td>
				<input class="text_area" type="text" name="retweet_to_profile" id="retweet_to_profile" size="32" maxlength="250" value="<?php  echo $this -> item -> retweet_to_profile;?>" />
				</td>
			</tr>
			<tr>
				<td width="100" align="right" class="key"><label for="local_publish"> <?php  echo JText::_('Local Publish ?');?>: </label></td>
				<td>
				<?php  echo $this -> lists['local_publish'];?>	</td>
			</tr>
			<tr>
				<td width="100" align="right" class="key"><label for="publish_to_facebok"> <?php  echo JText::_('Publish To Facebok');?>: </label></td>
				<td>
				<?php  echo $this -> lists['publish_to_face_book'];?></td>
			</tr>
			<tr>
				<td width="100" align="right" class="key"><label for="share_service"> <?php  echo JText::_('Share_service');?>: </label></td>
				<td>
				<input class="text_area" type="text" name="share_service" id="share_service" size="32" maxlength="250" value="<?php  echo $this -> item -> share_service;?>" />
				</td>
			</tr>
			<tr>
				<td width="100" align="right" class="key"><label for="embed_code"> <?php  echo JText::_('Show Embed Code ?');?>: </label></td>
				<td>
				<?php  echo $this -> lists['embed_code'];?></td>
			</tr>
			<tr>
				<td width="100" align="right" class="key"><label for="email_to"> <?php  echo JText::_('E-mail To: (coma seperated)');?>: </label></td>
				<td>
				<input class="text_area" type="text" name="email_to" id="email_to" size="32" maxlength="250" value="<?php  echo $this -> item -> email_to;?>" />
				</td>
			</tr>
			<tr>
				<td width="100" align="right" class="key"><label for="include_media"> <?php  echo JText::_('Include Media in Email ?');?>: </label></td>
				<td>
				<?php  echo $this -> lists['include_media'];?>
				</td>
			</tr>
			<tr>
				<td width="100" align="right" class="key"><label for="mail_sent"> <?php echo JText::_('Was E-mail Sent ?');?>: </label></td>
				<td>
				<?php  echo $this -> lists['mail_sent'];?></td>
			</tr>
			<tr>
				<td width="100" align="right" class="key"><label for="send_again"> <?php echo JText::_( 'Send Again ?' );?>: </label></td>
				<td>
				<?php  echo $this -> lists['send_again'];?>	</td>
			</tr>
		</table>
	</fieldset>
	</td> <td valign="top">
	<fieldset class="adminform">
		<legend>
			<?php echo JText::_( 'Parameters' );
			?>
		</legend>
		<table class="admintable">
			<tr>
				<td colspan="2"><?php echo $this->params->render();
				?></td>
			</tr>
		</table>
	</fieldset></td>
	</tr>
	</table>
	<input type="hidden" name="option" value="com_retweet" />
	<input type="hidden" name="cid[]" value="<?php echo $this->item->id; ?>" />
	<input type="hidden" name="task" value="" />
</form>